package com.wxp.demo09.screen;

import android.os.Bundle;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;

import com.wxp.demo09.R;
import com.wxp.demo09.util.LogUtils;
import com.wxp.demo09.util.ToastUtil;

/**
 * 3.1 生命周期测试
 */
public class LifeCycleTestActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_life_cycle_test);

        this.setTitle("3.1 生命周期测试");

        LogUtils.debug("onCreate");
        ToastUtil.show(this, "onCreate");
    }

    @Override
    protected void onStart() {
        super.onStart();
        LogUtils.debug("onStart");
        ToastUtil.show(this, "onStart");
    }

    @Override
    protected void onResume() {
        super.onResume();
        LogUtils.debug("onResume");
        ToastUtil.show(this, "onResume");
    }

    @Override
    protected void onPause() {
        super.onPause();
        LogUtils.debug("onPause");
        ToastUtil.show(this, "onPause");
    }

    @Override
    protected void onStop() {
        super.onStop();
        LogUtils.debug("onStop");
        ToastUtil.show(this, "onStop");
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        LogUtils.debug("onDestroy");
        ToastUtil.show(this, "onDestroy");
    }

}